package cn.bs.busuo.account.dao.persist.repository.impl;

import cn.bs.busuo.account.dao.persist.mapper.SightsSeasonsMapper;
import cn.bs.busuo.account.dao.persist.repository.ISightsSeasonsRepository;
import cn.bs.busuo.account.pojo.entity.SightsSeasons;
import cn.bs.busuo.account.pojo.vo.SeasonVO;
import cn.bs.busuo.account.pojo.vo.SightsSeasonsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class SightsSeasonsRepositoryImpl implements ISightsSeasonsRepository {
    @Autowired
    private SightsSeasonsMapper sightsSeasonsMapper;

    /**
     * 新增季节景点
     */
    @Override
    public void addSeason(SightsSeasons sightsSeasons) {
        sightsSeasonsMapper.insert(sightsSeasons);
    }

    /**
     * 删除季节景点
     */
    @Override
    public void delectSeason(Long id) {
        sightsSeasonsMapper.delectSeason(id);
    }

    /**
     * 根据季节id查询季节
     */
    @Override
    public SeasonVO selectById(Long id) {
        return sightsSeasonsMapper.selectById(id);
    }

    /**
     * 根据季节id和景点id查询数据
     */
    @Override
    public SightsSeasonsVO selectByType(SightsSeasons sightsSeasons) {
        return sightsSeasonsMapper.selectByType(sightsSeasons);
    }
}
